package com.lzx.adx.report.enums;

public enum ElmCovertGtdEventTypeEnums {

    register("REGISTER","2","注册"),
    firstPurchase("PURCHASE","3","24饿了吗注册24小时内首购，首笔订单"),
    retain("START_APP","4","次日留存"),

    reEngage("ACTIVATE_APP","6","拉活，唤醒"),

    preOrder("PURCHASE","7","拉活成单"),
    firstPurchase2("PURCHASE","8","4饿了吗注册后，在当日内首购，首笔订单"),
    ;


    /**
     * elm
     */
    private String elmCode;

    /**
     * 广点通code
     */
    private String gdtCode;

    private String msg;

    public String getElmCode() {
        return elmCode;
    }

    public String getGdtCode() {
        return gdtCode;
    }

    public String getMsg() {
        return msg;
    }

    /**
     * 根据饿了么code ,找到广点通code
     * @param elmCode
     * @return
     */
    public static String getGTdCode(String elmCode){
        for (ElmCovertGtdEventTypeEnums value : ElmCovertGtdEventTypeEnums.values()) {
            if(value.getElmCode().equals(elmCode)){
                return value.getGdtCode();
            }
        }
        return  null;
    }


    ElmCovertGtdEventTypeEnums(String gdtCode,String elmCode, String msg) {
        this.elmCode = elmCode;
        this.gdtCode = gdtCode;
        this.msg = msg;
    }
}
